#include <QtDBus/QtDBus>
/*
 * Proxy class for interface com.deepin.dde.DockFrontEnd
 */
class DBusInterface: public QDBusAbstractInterface
{
    Q_OBJECT

    Q_SLOT void __propertyChanged__(const QDBusMessage& msg)
    {
        QList<QVariant> arguments = msg.arguments();
        if (3 != arguments.count())
            return;
        QString interfaceName = msg.arguments().at(0).toString();
        if (interfaceName != "com.test.adapter")
            return;
        QVariantMap changedProps = qdbus_cast<QVariantMap>(arguments.at(1).value<QDBusArgument>());
        foreach(const QString &prop, changedProps.keys()) {
        const QMetaObject* self = metaObject();
            for (int i=self->propertyOffset(); i < self->propertyCount(); ++i) {
                QMetaProperty p = self->property(i);
                if (p.name() == prop) {
                    emit p.notifySignal().invoke(this);
                }
            }
        }
   }
public:
    static inline const char *staticInterfaceName()
    { return "com.test.adapter"; }

public:
    DBusInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0) 
        : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
    {
        QDBusConnection::sessionBus().connect(this->service(), this->path(), "org.freedesktop.DBus.Properties",  "PropertiesChanged","sa{sv}as", this, SLOT(__propertyChanged__(QDBusMessage)));
    }

    ~DBusInterface()
    {
        QDBusConnection::sessionBus().disconnect(service(), path(), "org.freedesktop.DBus.Properties",  "PropertiesChanged",  "sa{sv}as", this, SLOT(propertyChanged(QDBusMessage)));
    }

    Q_PROPERTY(qint32 geometry READ geometry NOTIFY GeometryChanged)
    inline qint32 geometry() const
    { return qvariant_cast< qint32 >(property("geometry")); }

public Q_SLOTS: // METHODS
Q_SIGNALS: // SIGNALS
    void geometryChanged(const QRect &geometry);
    // begin property changed signals
    void GeometryChanged();
};